package control;

import java.awt.Color;

import model.BoardModel;

public abstract class Player {

	private boolean blocked = false;
	private Color color;
	private String colorName;
	private BoardModel model;
	private String name;

	public Player(String n, Color c, BoardModel model) {
		this.setModel(model);
		name = n;
		color = c;
		if (c == Color.BLACK)
			colorName = "Black";
		else
			colorName = "White";
	}

	public Color getColor() {
		return color;
	}

	public String getColorName() {
		return colorName;
	}

	public BoardModel getModel() {
		return model;
	}

	public abstract Pos getNextMove();

	public String getPlayerName() {
		return name;
	}

	public String getShortColorName() {
		if (colorName == "Black")
			return "B";
		else
			return "W";
	}

	public abstract boolean isAI();

	public boolean isBlocked() {
		return blocked;
	}

	public void setBlocked(boolean blocked) {
		this.blocked = blocked;
	}

	public void setModel(BoardModel model) {
		this.model = model;
	}

}
